#include "stock.h"
#include <iostream>
int stock_main()
{
    Stock stock1;
    stock1.buy(100, 1.0F/3);
    stock1.buy(100,  2.0F/3);
    stock1.sell(100, 1.0F/3);
    stock1.setPrice(2.0F / 3);
    stock1.show();
    
    Stock stock2("Alibaba", 2, 200.0);
    stock2.show();
    
    /*
    输出的结果:
    -------------------------------------------
    company: none name
    shares: 100
    shareValue: 0.667
    totalValue: 66.667
    -------------------------------------------
    company: Alibaba
    shares: 2
    shareValue: 200.000
    totalValue: 400.000
    dealloc function is called
    dealloc function is called
    */
    return 0;
}
